Skip to main content

revXMLPreviousSibling

Type

function

Summary

Returns the path to a child node's previous sibling node.

Syntax

revXMLPreviousSibling(<treeID>, <siblingNode>, [incText])

Description

Use the revXMLPreviousSibling function to back up through the list of nodes on the current level.

If the revXMLPreviousSibling function encounters an error, it returns an error message starting with "xmlerr".

note

If the incText form is specified and is true the function will return text nodes in processing. Text nodes can be accessed using the revXMLNodeContents function with the extended path format where text only nodes are numerically indexed eg summary/command/[1] is the first text node of the summary/command node.

Important

The incText form is experimental.

Important

The revXMLPreviousSibling function is part of the XML library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.

Parameters

NameTypeDescription

treeID

The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.

siblingNode

The path to the node where you want to start.

Examples

revXMLPreviousSibling(22,"/City/Publisher")
put revXMLPreviousSibling(myDoc,thisNode) into thisNode

control structure: function

function: revXMLRootNode, revXMLFirstChild, revXMLCreateTree, revXMLCreateTreeFromFile

glossary: LiveCode custom library, Standalone Application Settings, return, standalone application

library: XML library

property: nodes

Compatibility and Support

Introduced

LiveCode 2.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?